{extend name="$_admin_base_layout" /} {block name="body"}

<div class="container-fluid" style="padding-top: 10px; background-color: rgb(240, 242, 245);">
    <div class="panel">
        <div class="panel-body">
            <form class="form-inline form-search">
                <div class="form-group">
                    <label>状态：</label>
                    {html:select name="status" options="data_status" selected="status" clazz="form-control" first="全部"/}
                </div>

                <div class="form-group">
                    <label>用户组名称：</label>
                    <input type="text" class="form-control" name="title" value="{$title|default=''}">
                </div>
                <button type="submit" class="btn btn-primary">查询</button>
                <button type="button" class="btn btn-default btn-reset">重置</button>
            </form>
        </div>
        <!-- 数据表格 -->
        <table class="table table-sorter">
            <!-- 表头 -->
            <thead>
            <tr>
                <th style="width: 20px;">#</th>
                <th>用户组</th>
                <th>描述</th>
                <th>授权</th>
                <th>状态</th>
                <th style="width: 110px;">操作</th>
            </tr>
            </thead>
            <!-- 列表 -->
            <tbody>
            {notempty name="data_list"} {volist name="data_list" id="info"}
            <tr>
                <td>{$i}</td>
                <td>{$info.title}</td>
                <td>{$info.remark}</td>
                <td style="width: 200px;">
                    <a href="{:url('menu',array('id'=>$info['id']))}">菜单授权</a>
                    <a href="{:url('data',array('id'=>$info['id']))}">数据授权</a>
                    <a href="{:url('user',array('id'=>$info['id']))}" data-type="iframe" data-toggle="modal"
                       data-height="530" data-title="用户授权 ( {$info.title} )" data-icon="user">用户授权</a>

                </td>
                <td style="width: 80px;">{$info.status_text|raw}</td>
                <td>
                    <a href="{:url('edit',array('id'=>$info['id']))}" data-toggle="modal" data-icon="cogs"
                       data-backdrop="static" data-title="编辑权限">编辑</a>
                    {eq name="info['status']" value="0"}
                    <a href="{:url('resume',array('id'=>$info['id']))}" class="confirm ajax-get">启用</a>
                    {else/}
                    <a href="{:url('forbid',array('id'=>$info['id']))}" class="confirm ajax-get text-warning">禁用</a>
                    {/eq}
                    <a href="{:url('delete',array('id'=>$info['id']))}"
                       class="confirm ajax-get text-red">删除</a>
                </td>
            </tr>
            {/volist} {else/}
            <tr>
                <td class="text-center" colspan="6">aOh! 暂时还没有内容!</td>
            </tr>
            {/notempty}
            </tbody>
            <tfoot>
            <tr>
                <td colspan="6">
                    {$pager||raw}
                </td>
            </tr>
            </tfoot>
        </table>
    </div>
</div>
{/block}
{block name="sub_menu_action"}
<ul class="nav nav-pills" style="margin-right: 10px;">

    <li>
        <a href="{:url('add')}" data-toggle="modal" data-icon="group" data-backdrop="static" data-title="新增用户组">
            <i class="icon-plus"></i> 新增
        </a>
    </li>

</ul>
{/block}
